/**
 * @file:          FalLinear.h
 * @brief:         
 * @details:       
 * @author:        wjh
 * @date created:  2023.11.13
 * @version:       1.0.0
 * @par copyright (c):
 *   
 * @par history (desc):
 *   version:1.0.0, wjh, 2023.11.13,14:28:30
 */


#ifndef _FALLINEAR_H_
#define _FALLINEAR_H_

/* Include Files **************************************************************/
#include "Datatype.h"
#include "common.h"

/* Macro Definition ***********************************************************/

/* Data Type Define ***********************************************************/
typedef struct FalLinear
{
    /* public data */
    uint16_t param_en;
    float param_a;
    float param_d;
    float param_zoom;
    uint16_t param_section_nums;
    float param_inteval_gain;

    float *xn;
    float *yn;
    float *b;

    float *k;

    float out;

    /* private data */
    
    /* public method */
    void (*Init)(struct FalLinear *self);
    float (*Run)(struct FalLinear *self, float x);
    
    /* private method */
    
}FalLinear;
    
/* Variable Declare ***********************************************************/

/* Function Declare ***********************************************************/
void FalLinear_Init(struct FalLinear *self);
float FalLinear_Run(struct FalLinear *self, float x);


#endif